package com.bruce.pattern.structural.decorator.v2;


import org.junit.Test;

/**
 * Created by bruce on 2018/11/3 22:55
 */
public class MainTest {

    @Test
    public void test1() {
        AbsBattercake absBattercake;
        absBattercake = new Battercake();
        absBattercake = new EggDecorator(absBattercake);
        absBattercake = new EggDecorator(absBattercake);
        absBattercake = new SausageDecorator(absBattercake);

        System.out.println(absBattercake.getDesc() + " 价格:" + absBattercake.cost());

    }


}
